package docs

import (
	"encoding/json"
	"strings"

	"github.com/astaxie/beego"
	"github.com/astaxie/beego/swagger"
)

const (
    Rootinfo string = `{"apiVersion":"1.0.0","swaggerVersion":"1.2","apis":[{"path":"/video","description":"视频直播\n"},{"path":"/room","description":"图文直播\n"},{"path":"/user","description":"用户\n"},{"path":"/homepage","description":"首页\n"},{"path":"/livepage","description":"直播页\n"},{"path":"/read","description":"阅读\n"},{"path":"/search","description":"搜索\n"},{"path":"/file","description":"文件\n"},{"path":"/comment","description":"评论\n"}],"info":{"title":"网创园新媒体App 接口协议说明","description":"用于客户端和服务端的交互的调式和说明，也当做接口协议","contact":"zhujiarong@95180.com"}}`
    Subapi string = `{"/comment":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/comment","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/send","description":"","operations":[{"httpMethod":"POST","nickname":"comment","type":"","summary":"发表评论","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"type","description":"\"类型，0视频，1图文\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"content","description":"\"评论内容\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"session_id","description":"\"会话id\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"token","description":"\"登陆成功返回的token\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.SendStatus","responseModel":"SendStatus"}]}]},{"path":"/list","description":"","operations":[{"httpMethod":"POST","nickname":"comment","type":"","summary":"获取评论","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"type","description":"\"类型，0视频，1图文\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"session_id","description":"\"会话id\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"size","description":"\"请求条目数\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":false,"minimum":0,"maximum":0},{"paramType":"form","name":"current_page","description":"\"当前Page，在分页时候需要使用\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":false,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.CommentInfo","responseModel":"CommentInfo"}]}]}],"models":{"CommentInfo":{"id":"CommentInfo","required":["code","content","nick_name"],"properties":{"code":{"type":"int","description":"评论id","format":""},"content":{"type":"string","description":"评论内容","format":""},"nick_name":{"type":"string","description":"评论昵称","format":""}}},"ResStatus":{"id":"ResStatus","required":["data","ret","msg"],"properties":{"data":{"type":"\u0026{939 0xc20813f140 false}","description":"返回数据对象","format":""},"msg":{"type":"string","description":"提示信息 默认值为空字符串","format":""},"ret":{"type":"int","description":"返回状态码 200为正常","format":""}}},"SendStatus":{"id":"SendStatus","required":["code","msg"],"properties":{"code":{"type":"int","description":"0:发表成功,...","format":""},"msg":{"type":"string","description":"错误信息","format":""}}}}},"/file":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/file","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/byte","description":"","operations":[{"httpMethod":"POST","nickname":"File","type":"","summary":"文件上传","parameters":[{"paramType":"path","name":"type","description":"\"文件类型\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"path","name":"file","description":"\"内容\"","dataType":"byte[]","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.File","responseModel":"File"}]}]},{"path":"/","description":"","operations":[{"httpMethod":"POST","nickname":"File","type":"","summary":"文件上传","parameters":[{"paramType":"path","name":"type","description":"\"文件类型\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"file","description":"\"内容\"","dataType":"file","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.File","responseModel":"File"}]}]}],"models":{"File":{"id":"File","required":["code","id","url"],"properties":{"code":{"type":"int","description":"状态 0成功","format":""},"id":{"type":"int","description":"文件ID","format":""},"url":{"type":"string","description":"文件url","format":""}}},"ResStatus":{"id":"ResStatus","required":["data","ret","msg"],"properties":{"data":{"type":"\u0026{939 0xc208182000 false}","description":"返回数据对象","format":""},"msg":{"type":"string","description":"提示信息 默认值为空字符串","format":""},"ret":{"type":"int","description":"返回状态码 200为正常","format":""}}}}},"/homepage":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/homepage","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/recommends","description":"","operations":[{"httpMethod":"POST","nickname":"获取首页推荐列表","type":"","summary":"推荐列表","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"size","description":"\"请求条目数\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"current_page","description":"\"当前Page\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.RecommendInfo","responseModel":"RecommendInfo"}]}]},{"path":"/banners","description":"","operations":[{"httpMethod":"POST","nickname":"获取首页轮播图列表","type":"","summary":"首页banner列表","parameters":[{"paramType":"form","name":"app","description":"\"当前App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.BannerInfo","responseModel":"BannerInfo"}]}]}],"models":{"BannerInfo":{"id":"BannerInfo","required":["code","err","banners"],"properties":{"banners":{"type":"Banners","description":"首页Banner","format":""},"code":{"type":"int","description":"状态码","format":""},"err":{"type":"string","description":"错误信息 默认值为空字符串","format":""}}},"Banners":{"id":"Banners","required":["data","cur_pag","size"],"properties":{"cur_pag":{"type":"int","description":"当前页 不分页时默认值为0","format":""},"data":{"type":"array","description":"首页轮班数组内容","items":{"$ref":"Recommend"},"format":""},"size":{"type":"int","description":"请求的条目","format":""}}},"Recommend":{"id":"Recommend","required":["id","type","title","image_url","active_num","time","chan_id","article_category","content_url","gzh_id","gzh_name","comment_num","praise","collect"],"properties":{"active_num":{"type":"int","description":"当前活跃人数","format":""},"article_category":{"type":"string","description":"文章种类,type=0的时候，需要使用","format":""},"chan_id":{"type":"int","description":"频道id，type=0 无需解析","format":""},"collect":{"type":"int","description":"是否已经收藏，0未收藏，1已收藏，登陆用户需要返回","format":""},"comment_num":{"type":"int","description":"文章评论数，type=0的时候，需要使用","format":""},"content_url":{"type":"string","description":"文章的地址，type=0的时候，需要使用","format":""},"gzh_id":{"type":"string","description":"公众号id，type=0的时候，需要使用","format":""},"gzh_name":{"type":"string","description":"公众号名称，type=0的时候，需要使用","format":""},"id":{"type":"int","description":"唯一id","format":""},"image_url":{"type":"string","description":"图片地址","format":""},"praise":{"type":"int","description":"是否已经点赞，0未点赞，1已点赞，登陆用户需要返回","format":""},"time":{"type":"string","description":"发布时间","format":""},"title":{"type":"string","description":"标题","format":""},"type":{"type":"int","description":"类型，0文章、1视频直播、2视频回放、3图文直播、4图文回放","format":""}}},"RecommendInfo":{"id":"RecommendInfo","required":["code","err","recommends"],"properties":{"code":{"type":"int","description":"状态码","format":""},"err":{"type":"string","description":"错误信息 默认值为空字符串","format":""},"recommends":{"type":"Recommends","description":"首页Item","format":""}}},"Recommends":{"id":"Recommends","required":["data","cur_pag","size"],"properties":{"cur_pag":{"type":"int","description":"当前页 不分页时默认值为0","format":""},"data":{"type":"array","description":"首页item数组内容","items":{"$ref":"Recommend"},"format":""},"size":{"type":"int","description":"请求的条目","format":""}}},"ResStatus":{"id":"ResStatus","required":["data","ret","msg"],"properties":{"data":{"type":"\u0026{939 0xc2081a5080 false}","description":"返回数据对象","format":""},"msg":{"type":"string","description":"提示信息 默认值为空字符串","format":""},"ret":{"type":"int","description":"返回状态码 200为正常","format":""}}}}},"/livepage":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/livepage","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/list","description":"","operations":[{"httpMethod":"POST","nickname":"直播列表","type":"","summary":"列表","parameters":[{"paramType":"form","name":"app","description":"\"当前App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"size","description":"\"请求条目数\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"current_page","description":"\"当前Page\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.LiveInfo","responseModel":"LiveInfo"}]}]}],"models":{"Live":{"id":"Live","required":["type","session_id","active_num","title","image_url"],"properties":{"active_num":{"type":"int","description":"当前活跃人数","format":""},"image_url":{"type":"string","description":"图片地址","format":""},"session_id":{"type":"int","description":"会话id","format":""},"title":{"type":"string","description":"标题","format":""},"type":{"type":"int","description":"类型 1视频直播、2视频回放、3图文直播、4图文回放","format":""}}},"LiveInfo":{"id":"LiveInfo","required":["code","err","cur_pag","size","lives"],"properties":{"code":{"type":"int","description":"状态码","format":""},"cur_pag":{"type":"int","description":"当前页 不分页时默认值为0","format":""},"err":{"type":"string","description":"错误信息 默认值为空字符串","format":""},"lives":{"type":"array","description":"直播items","items":{"$ref":"Live"},"format":""},"size":{"type":"int","description":"请求的条目","format":""}}},"ResStatus":{"id":"ResStatus","required":["data","ret","msg"],"properties":{"data":{"type":"\u0026{939 0xc208159230 false}","description":"返回数据对象","format":""},"msg":{"type":"string","description":"提示信息 默认值为空字符串","format":""},"ret":{"type":"int","description":"返回状态码 200为正常","format":""}}}}},"/read":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/read","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/subscribe/articles","description":"","operations":[{"httpMethod":"POST","nickname":"list","type":"","summary":"订阅文章列表","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"size","description":"\"请求条目数\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":false,"minimum":0,"maximum":0},{"paramType":"form","name":"current_page","description":"\"当前Page，在分页时候需要使用\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":false,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.SubscribeListResponse","responseModel":"SubscribeListResponse"}]}]},{"path":"/subscribe/gzhs","description":"","operations":[{"httpMethod":"POST","nickname":"list","type":"","summary":"订阅公众号列表","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"size","description":"\"请求条目数\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":false,"minimum":0,"maximum":0},{"paramType":"form","name":"current_page","description":"\"当前Page，在分页时候需要使用\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":false,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.GzhListResponse","responseModel":"GzhListResponse"}]}]},{"path":"/gzh/articles","description":"","operations":[{"httpMethod":"POST","nickname":"list","type":"","summary":"公众号文章列表","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"gzh_id","description":"\"公众号id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"size","description":"\"请求条目数\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":false,"minimum":0,"maximum":0},{"paramType":"form","name":"current_page","description":"\"当前Page，在分页时候需要使用\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":false,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.SubscribeListResponse","responseModel":"SubscribeListResponse"}]}]},{"path":"/gzh/release","description":"","operations":[{"httpMethod":"POST","nickname":"ReleaseSubscribeGzh","type":"","summary":"解除订阅公众号","parameters":[{"paramType":"form","name":"token","description":"\"登陆成功token\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"gzh_id","description":"\"公众号id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.ReleaseSubscribeGzhResponse","responseModel":"ReleaseSubscribeGzhResponse"}]}]},{"path":"/gzh/add","description":"","operations":[{"httpMethod":"POST","nickname":"AddSubscribeGzh","type":"","summary":"添加订阅公众号","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"token","description":"\"登陆成功token\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"gzh_id","description":"\"公众号id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.ReleaseSubscribeGzhResponse","responseModel":"ReleaseSubscribeGzhResponse"}]}]},{"path":"/gzhs","description":"","operations":[{"httpMethod":"POST","nickname":"list","type":"","summary":"按类别查询公众号信息","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"gzh_type","description":"\"公众号类别,1咨询，2运动，3娱乐，4生活，5科技，6行业，7艺术，8教育，9发现\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"size","description":"\"请求条目数\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":false,"minimum":0,"maximum":0},{"paramType":"form","name":"current_page","description":"\"当前Page，在分页时候需要使用\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":false,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.SubscribeListResponse","responseModel":"SubscribeListResponse"}]}]},{"path":"/article/collect","description":"","operations":[{"httpMethod":"POST","nickname":"CollectArticle","type":"","summary":"收藏文章","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"token","description":"\"登陆成功token\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"article_id","description":"\"文章id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.CollectArticleResponse","responseModel":"CollectArticleResponse"}]}]},{"path":"/article/cancel","description":"","operations":[{"httpMethod":"POST","nickname":"CollectArticle","type":"","summary":"取消收藏文章","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"token","description":"\"登陆成功token\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"article_id","description":"\"文章id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.CollectArticleResponse","responseModel":"CollectArticleResponse"}]}]},{"path":"/article/praise","description":"","operations":[{"httpMethod":"POST","nickname":"PraiseArticle","type":"","summary":"文章点赞","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"token","description":"\"登陆成功token\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"article_id","description":"\"文章id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.PraiseArticleResponse","responseModel":"PraiseArticleResponse"}]}]},{"path":"/article/unpraise","description":"","operations":[{"httpMethod":"POST","nickname":"UnPraise","type":"","summary":"文章取消点赞","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"token","description":"\"登陆成功token\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"article_id","description":"\"文章id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.PraiseArticleResponse","responseModel":"PraiseArticleResponse"}]}]},{"path":"/article/comment","description":"","operations":[{"httpMethod":"POST","nickname":"CommentArticle","type":"","summary":"发布文章评论","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"token","description":"\"登陆成功token\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"content","description":"\"评论内容\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"article_id","description":"\"文章id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.CommentArticleResponse","responseModel":"CommentArticleResponse"}]}]},{"path":"/article/comments","description":"","operations":[{"httpMethod":"POST","nickname":"ListComments","type":"","summary":"获取文章评论","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"article_id","description":"\"文章id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"size","description":"\"请求条目数\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":false,"minimum":0,"maximum":0},{"paramType":"form","name":"current_page","description":"\"当前Page，在分页时候需要使用\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":false,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.ListCommentsResponse","responseModel":"ListCommentsResponse"}]}]},{"path":"/collect/articles","description":"","operations":[{"httpMethod":"POST","nickname":"ListCollectArticles","type":"","summary":"返回收藏文章列表","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"size","description":"\"请求条目数\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":false,"minimum":0,"maximum":0},{"paramType":"form","name":"current_page","description":"\"当前Page，在分页时候需要使用\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":false,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.ListCollectArticlesResponse","responseModel":"ListCollectArticlesResponse"}]}]},{"path":"/collect/cancels","description":"","operations":[{"httpMethod":"POST","nickname":"CancelArticles","type":"","summary":"文章批量取消收藏","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"token","description":"\"登陆成功token\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"article_ids","description":"\"文章ids，中间用，分割\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.CancelArticlesResponse","responseModel":"CancelArticlesResponse"}]}]}],"models":{"Article":{"id":"Article","required":["id","gzh_id","title","image_url","time","gzh_name","article_category","content_url","comment_num","praise","collect"],"properties":{"article_category":{"type":"string","description":"文章种类","format":""},"collect":{"type":"int","description":"是否已经收藏，0未收藏，1已收藏，登陆用户需要返回","format":""},"comment_num":{"type":"int","description":"文章评论数","format":""},"content_url":{"type":"string","description":"文章的地址","format":""},"gzh_id":{"type":"string","description":"公众号id","format":""},"gzh_name":{"type":"string","description":"公众号名称","format":""},"id":{"type":"int","description":"唯一id","format":""},"image_url":{"type":"string","description":"图片地址","format":""},"praise":{"type":"int","description":"是否已经点赞，0未点赞，1已点赞，登陆用户需要返回","format":""},"time":{"type":"string","description":"发布时间","format":""},"title":{"type":"string","description":"标题","format":""}}},"ArticleCommentInfo":{"id":"ArticleCommentInfo","required":["id","content","icon_url","nick_name","time"],"properties":{"content":{"type":"string","description":"评论内容","format":""},"icon_url":{"type":"string","description":"发布者IconUrl","format":""},"id":{"type":"int","description":"唯一id","format":""},"nick_name":{"type":"string","description":"发布者昵称","format":""},"time":{"type":"string","description":"发布时间","format":""}}},"CancelArticlesResponse":{"id":"CancelArticlesResponse","required":["code","msg"],"properties":{"code":{"type":"int","description":"0:成功,...","format":""},"msg":{"type":"string","description":"错误信息","format":""}}},"CollectArticleResponse":{"id":"CollectArticleResponse","required":["code","msg"],"properties":{"code":{"type":"int","description":"0:成功,...","format":""},"msg":{"type":"string","description":"错误信息","format":""}}},"CommentArticleResponse":{"id":"CommentArticleResponse","required":["code","msg"],"properties":{"code":{"type":"int","description":"0:发表评论成功,...","format":""},"msg":{"type":"string","description":"错误信息","format":""}}},"GzhInfo":{"id":"GzhInfo","required":["id","title","icon_url","sub_num","publish_num"],"properties":{"icon_url":{"type":"string","description":"icon地址","format":""},"id":{"type":"int","description":"唯一id","format":""},"publish_num":{"type":"int","description":"发布的文章数","format":""},"sub_num":{"type":"int","description":"已订阅人数","format":""},"title":{"type":"string","description":"公众号名称","format":""}}},"GzhListResponse":{"id":"GzhListResponse","required":["code","msg","cur_pag","size","gzhs"],"properties":{"code":{"type":"int","description":"0:获取成功,...","format":""},"cur_pag":{"type":"int","description":"当前页 不分页时默认值为0","format":""},"gzhs":{"type":"array","description":"订阅的公众号列表","items":{"$ref":"GzhInfo"},"format":""},"msg":{"type":"string","description":"错误信息","format":""},"size":{"type":"int","description":"请求的条目","format":""}}},"ListCollectArticlesResponse":{"id":"ListCollectArticlesResponse","required":["code","msg","cur_pag","size","articles"],"properties":{"articles":{"type":"array","description":"订阅的文章列表","items":{"$ref":"Article"},"format":""},"code":{"type":"int","description":"0:获取成功,...","format":""},"cur_pag":{"type":"int","description":"当前页 不分页时默认值为0","format":""},"msg":{"type":"string","description":"错误信息","format":""},"size":{"type":"int","description":"请求的条目","format":""}}},"ListCommentsResponse":{"id":"ListCommentsResponse","required":["code","msg","cur_pag","size","comments"],"properties":{"code":{"type":"int","description":"0:获取成功,...","format":""},"comments":{"type":"array","description":"文章评论列表","items":{"$ref":"ArticleCommentInfo"},"format":""},"cur_pag":{"type":"int","description":"当前页 不分页时默认值为0","format":""},"msg":{"type":"string","description":"错误信息","format":""},"size":{"type":"int","description":"请求的条目","format":""}}},"PraiseArticleResponse":{"id":"PraiseArticleResponse","required":["code","msg"],"properties":{"code":{"type":"int","description":"0:成功,...","format":""},"msg":{"type":"string","description":"错误信息","format":""}}},"ReleaseSubscribeGzhResponse":{"id":"ReleaseSubscribeGzhResponse","required":["code","msg"],"properties":{"code":{"type":"int","description":"0:成功,...","format":""},"msg":{"type":"string","description":"错误信息","format":""}}},"ResStatus":{"id":"ResStatus","required":["data","ret","msg"],"properties":{"data":{"type":"\u0026{939 0xc2081f41b0 false}","description":"返回数据对象","format":""},"msg":{"type":"string","description":"提示信息 默认值为空字符串","format":""},"ret":{"type":"int","description":"返回状态码 200为正常","format":""}}},"SubscribeListResponse":{"id":"SubscribeListResponse","required":["code","msg","cur_pag","size","articles"],"properties":{"articles":{"type":"array","description":"订阅的文章列表","items":{"$ref":"Article"},"format":""},"code":{"type":"int","description":"0:获取成功,...","format":""},"cur_pag":{"type":"int","description":"当前页 不分页时默认值为0","format":""},"msg":{"type":"string","description":"错误信息","format":""},"size":{"type":"int","description":"请求的条目","format":""}}}}},"/room":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/room","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/start","description":"","operations":[{"httpMethod":"POST","nickname":"开始图文直播","type":"","summary":"开始图文直播","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"chanId","description":"\"频道id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"token","description":"\"登陆成功token\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.StartStatus","responseModel":"StartStatus"}]}]},{"path":"/changes","description":"","operations":[{"httpMethod":"POST","nickname":"获取图文直播频道列表","type":"","summary":"获取图文频道列表","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"token","description":"\"登陆成功token\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.Channels","responseModel":"Channels"}]}]},{"path":"/list","description":"","operations":[{"httpMethod":"POST","nickname":"获取最新条目","type":"","summary":"获取最新条目","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"size","description":"\"请求条目数\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"current_page","description":"\"当前Page\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.Comments","responseModel":"Comments"}]}]},{"path":"/submit","description":"","operations":[{"httpMethod":"POST","nickname":"发布","type":"","summary":"发布条目内容","parameters":[{"paramType":"form","name":"app","description":"\"当前App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"chanId","description":"\"频道id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"token","description":"\"登陆成功token\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"content","description":"文章内容\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"imgs","description":"\"图片的地址,url之间用，分割\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.SubmitStatus","responseModel":"SubmitStatus"}]}]},{"path":"/close","description":"","operations":[{"httpMethod":"POST","nickname":"close","type":"","summary":"关闭直播","parameters":[{"paramType":"form","name":"app","description":"\"当前App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"chanId","description":"\"频道id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"token","description":"\"登陆成功token\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.CloseStatus","responseModel":"CloseStatus"}]}]}],"models":{"Channel":{"id":"Channel","required":["id","name"],"properties":{"id":{"type":"int","description":"频道id","format":""},"name":{"type":"string","description":"频道名称","format":""}}},"Channels":{"id":"Channels","required":["data","code","err"],"properties":{"code":{"type":"int","description":"状态码","format":""},"data":{"type":"array","description":"评论内容列表","items":{"$ref":"Channel"},"format":""},"err":{"type":"string","description":"错误信息 默认值为空字符串","format":""}}},"CloseStatus":{"id":"CloseStatus","required":["code","err"],"properties":{"code":{"type":"int","description":"0关闭成功,...","format":""},"err":{"type":"string","description":"错误信息","format":""}}},"Comment":{"id":"Comment","required":["id","time","name","content","imgs"],"properties":{"content":{"type":"string","description":"内容","format":""},"id":{"type":"int","description":"当前评论id","format":""},"imgs":{"type":"[]string","description":"图片地址 最多九张","format":""},"name":{"type":"string","description":"发布者名称","format":""},"time":{"type":"string","description":"发布时间","format":""}}},"Comments":{"id":"Comments","required":["data","cur_pag","size","code","err"],"properties":{"code":{"type":"int","description":"状态码","format":""},"cur_pag":{"type":"int","description":"当前页 不分页时默认值为0","format":""},"data":{"type":"array","description":"评论内容列表","items":{"$ref":"Comment"},"format":""},"err":{"type":"string","description":"错误信息 默认值为空字符串","format":""},"size":{"type":"int","description":"请求的条目","format":""}}},"ResStatus":{"id":"ResStatus","required":["data","ret","msg"],"properties":{"data":{"type":"\u0026{939 0xc2081823c0 false}","description":"返回数据对象","format":""},"msg":{"type":"string","description":"提示信息 默认值为空字符串","format":""},"ret":{"type":"int","description":"返回状态码 200为正常","format":""}}},"StartStatus":{"id":"StartStatus","required":["code","session_id","err"],"properties":{"code":{"type":"int","description":"0:开始直播成功,...","format":""},"err":{"type":"string","description":"错误信息","format":""},"session_id":{"type":"int","description":"会话id","format":""}}},"SubmitStatus":{"id":"SubmitStatus","required":["code","err"],"properties":{"code":{"type":"int","description":"0提交成功,...","format":""},"err":{"type":"string","description":"错误信息","format":""}}}}},"/search":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/search","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/","description":"","operations":[{"httpMethod":"POST","nickname":"search","type":"","summary":"搜索","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"query","description":"\"需要查询关键词\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"size","description":"\"请求条目数\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":false,"minimum":0,"maximum":0},{"paramType":"form","name":"current_page","description":"\"当前Page，在分页时候需要使用\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":false,"minimum":0,"maximum":0},{"paramType":"form","name":"search_type","description":"\"搜索类型1订阅，2文章，3视频，4直播，在分页时候需要使用\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":false,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.RecommendInfo","responseModel":"RecommendInfo"}]}]}],"models":{"Recommend":{"id":"Recommend","required":["id","type","title","image_url","active_num","time","chan_id","article_category","content_url","gzh_id","gzh_name","comment_num","praise","collect"],"properties":{"active_num":{"type":"int","description":"当前活跃人数","format":""},"article_category":{"type":"string","description":"文章种类,type=0的时候，需要使用","format":""},"chan_id":{"type":"int","description":"频道id，type=0 无需解析","format":""},"collect":{"type":"int","description":"是否已经收藏，0未收藏，1已收藏，登陆用户需要返回","format":""},"comment_num":{"type":"int","description":"文章评论数，type=0的时候，需要使用","format":""},"content_url":{"type":"string","description":"文章的地址，type=0的时候，需要使用","format":""},"gzh_id":{"type":"string","description":"公众号id，type=0的时候，需要使用","format":""},"gzh_name":{"type":"string","description":"公众号名称，type=0的时候，需要使用","format":""},"id":{"type":"int","description":"唯一id","format":""},"image_url":{"type":"string","description":"图片地址","format":""},"praise":{"type":"int","description":"是否已经点赞，0未点赞，1已点赞，登陆用户需要返回","format":""},"time":{"type":"string","description":"发布时间","format":""},"title":{"type":"string","description":"标题","format":""},"type":{"type":"int","description":"类型，0文章、1视频直播、2视频回放、3图文直播、4图文回放","format":""}}},"RecommendInfo":{"id":"RecommendInfo","required":["code","err","recommends"],"properties":{"code":{"type":"int","description":"状态码","format":""},"err":{"type":"string","description":"错误信息 默认值为空字符串","format":""},"recommends":{"type":"Recommends","description":"首页Item","format":""}}},"Recommends":{"id":"Recommends","required":["data","cur_pag","size"],"properties":{"cur_pag":{"type":"int","description":"当前页 不分页时默认值为0","format":""},"data":{"type":"array","description":"首页item数组内容","items":{"$ref":"Recommend"},"format":""},"size":{"type":"int","description":"请求的条目","format":""}}},"ResStatus":{"id":"ResStatus","required":["data","ret","msg"],"properties":{"data":{"type":"\u0026{939 0xc2081830e0 false}","description":"返回数据对象","format":""},"msg":{"type":"string","description":"提示信息 默认值为空字符串","format":""},"ret":{"type":"int","description":"返回状态码 200为正常","format":""}}}}},"/user":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/user","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/login","description":"","operations":[{"httpMethod":"POST","nickname":"login","type":"","summary":"登陆","parameters":[{"paramType":"form","name":"app","description":"\"当前App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"account","description":"\"用户名\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"password","description":"\"密码64位小写md5值\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.LoginResponse","responseModel":"LoginResponse"}]}]},{"path":"/reporter/login","description":"","operations":[{"httpMethod":"POST","nickname":"reporter login","type":"","summary":"记者登陆","parameters":[{"paramType":"form","name":"app","description":"\"当前App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"account","description":"\"用户名\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"password","description":"\"密码64位小写md5值\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.LoginResponse","responseModel":"LoginResponse"}]}]},{"path":"/register","description":"","operations":[{"httpMethod":"POST","nickname":"register","type":"","summary":"注册","parameters":[{"paramType":"form","name":"app","description":"\"当前App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"mobile_phone_number","description":"\"手机号码\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"password","description":"\"密码64位小写md5值\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"nickName","description":"\"昵称\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":false,"minimum":0,"maximum":0},{"paramType":"form","name":"portrait","description":"\"用户头像\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":false,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.RegisterResponse","responseModel":"RegisterResponse"}]}]},{"path":"/change","description":"","operations":[{"httpMethod":"POST","nickname":"change password","type":"","summary":"修改密码","parameters":[{"paramType":"form","name":"app","description":"\"当前App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"mobile_phone_number","description":"\"手机号码\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"new_password","description":"\"新密码64位小写md5值\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.ChangeResponse","responseModel":"ChangeResponse"}]}]},{"path":"/send","description":"","operations":[{"httpMethod":"POST","nickname":"SendSms","type":"","summary":"发送短信","parameters":[{"paramType":"form","name":"mobile_phone_number","description":"\"手机号码\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"option","description":"\"1为注册,2为重置密码\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.ChangeResponse","responseModel":"ChangeResponse"}]}]},{"path":"/check","description":"","operations":[{"httpMethod":"POST","nickname":"CheckSmsCode","type":"","summary":"发送短信","parameters":[{"paramType":"form","name":"mobile_phone_number","description":"\"手机号码\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"sms_code","description":"\"手机短信验证码\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.ChangeResponse","responseModel":"ChangeResponse"}]}]},{"path":"/upload","description":"","operations":[{"httpMethod":"POST","nickname":"UploadPortrait","type":"","summary":"发送短信","parameters":[{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"portrait","description":"\"图片的base64编码\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"token","description":"\"登陆成功返回的token\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.UploadPortraitResponse","responseModel":"UploadPortraitResponse"}]}]}],"models":{"ChangeResponse":{"id":"ChangeResponse","required":["code","msg"],"properties":{"code":{"type":"int","description":"0表示发送成功,1表示发送过于频繁(小于60间隔),2表示发送超出限制,3表示因网络错误发送失败,4表示手机号码格式不正确,5表示手机号码存在性有误,6表示参数不合法","format":""},"msg":{"type":"string","description":"错误信息","format":""}}},"LoginResponse":{"id":"LoginResponse","required":["code","msg","uid","mobile_phone_number","nick_name","portrait","token"],"properties":{"code":{"type":"int","description":"0表示登陆成功,1表示手机号码不存在,2表示密码错误,3表示记录最新登陆时间失败","format":""},"mobile_phone_number":{"type":"int","description":"用户的手机号码","format":""},"msg":{"type":"string","description":"错误信息","format":""},"nick_name":{"type":"string","description":"用户的昵称","format":""},"portrait":{"type":"string","description":"用户头像地址","format":""},"token":{"type":"string","description":"登陆成功的标示","format":""},"uid":{"type":"int","description":"本次登陆用户的id","format":""}}},"RegisterResponse":{"id":"RegisterResponse","required":["code","msg"],"properties":{"code":{"type":"int","description":"0表示注册成功,1表示手机号码已存在,2表示昵称已存在,3表示注册失败","format":""},"msg":{"type":"string","description":"错误信息","format":""}}},"ResStatus":{"id":"ResStatus","required":["data","ret","msg"],"properties":{"data":{"type":"\u0026{939 0xc208182660 false}","description":"返回数据对象","format":""},"msg":{"type":"string","description":"提示信息 默认值为空字符串","format":""},"ret":{"type":"int","description":"返回状态码 200为正常","format":""}}},"UploadPortraitResponse":{"id":"UploadPortraitResponse","required":["code","msg","icon_url"],"properties":{"code":{"type":"int","description":"0表示上传成功,1表示上传失败,9表示token校验失败","format":""},"icon_url":{"type":"string","description":"上传成功返回的url地址","format":""},"msg":{"type":"string","description":"错误信息","format":""}}}}},"/video":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/video","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/start","description":"","operations":[{"httpMethod":"POST","nickname":"start","type":"","summary":"开始直播","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"chanId","description":"\"频道id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"token","description":"\"登陆成功token\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.StartLiveStatus","responseModel":"StartLiveStatus"}]}]},{"path":"/changes","description":"","operations":[{"httpMethod":"POST","nickname":"频道列表","type":"","summary":"获取频道列表","parameters":[{"paramType":"form","name":"app","description":"\"当前App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"token","description":"\"登陆成功token\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.Channels","responseModel":"Channels"}]}]},{"path":"/close","description":"","operations":[{"httpMethod":"POST","nickname":"close","type":"","summary":"关闭直播","parameters":[{"paramType":"form","name":"app","description":"\"当前App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"chanId","description":"\"图文频道id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"token","description":"\"登陆成功token\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.CloseStatus","responseModel":"CloseStatus"}]}]},{"path":"/info","description":"","operations":[{"httpMethod":"POST","nickname":"获取视频详情","type":"","summary":"根据Id获取视频详情","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"id","description":"\"频道id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"type","description":"\"0回放，1直播\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":false,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.VideoDesInfo","responseModel":"VideoDesInfo"}]}]},{"path":"/praise","description":"","operations":[{"httpMethod":"POST","nickname":"Praise","type":"","summary":"点赞","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"id","description":"\"频道id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"token","description":"\"登陆成功token\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"type","description":"\"0回放，1直播\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.PraiseInfo","responseModel":"PraiseInfo"}]}]},{"path":"/unpraise","description":"","operations":[{"httpMethod":"POST","nickname":"UnPraise","type":"","summary":"取消点赞","parameters":[{"paramType":"form","name":"app","description":"\"App编号\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"id","description":"\"频道id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"uid","description":"\"用户id\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"token","description":"\"登陆成功token\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"form","name":"type","description":"\"0回放，1直播\"","dataType":"int","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"models.ResStatus","responseModel":"ResStatus"},{"code":200,"message":"models.PraiseInfo","responseModel":"PraiseInfo"}]}]}],"models":{"Channel":{"id":"Channel","required":["id","name"],"properties":{"id":{"type":"int","description":"频道id","format":""},"name":{"type":"string","description":"频道名称","format":""}}},"Channels":{"id":"Channels","required":["data","code","err"],"properties":{"code":{"type":"int","description":"状态码","format":""},"data":{"type":"array","description":"评论内容列表","items":{"$ref":"Channel"},"format":""},"err":{"type":"string","description":"错误信息 默认值为空字符串","format":""}}},"CloseStatus":{"id":"CloseStatus","required":["code","err"],"properties":{"code":{"type":"int","description":"0关闭成功,...","format":""},"err":{"type":"string","description":"错误信息","format":""}}},"PraiseInfo":{"id":"PraiseInfo","required":["code","err"],"properties":{"code":{"type":"int","description":"0:返回成功...","format":""},"err":{"type":"string","description":"错误信息","format":""}}},"ResStatus":{"id":"ResStatus","required":["data","ret","msg"],"properties":{"data":{"type":"\u0026{939 0xc2081599e0 false}","description":"返回数据对象","format":""},"msg":{"type":"string","description":"提示信息 默认值为空字符串","format":""},"ret":{"type":"int","description":"返回状态码 200为正常","format":""}}},"StartLiveStatus":{"id":"StartLiveStatus","required":["code","session_id","err","push_url"],"properties":{"code":{"type":"int","description":"0:开始直播成果...","format":""},"err":{"type":"string","description":"错误信息","format":""},"push_url":{"type":"string","description":"百度云的推送地址","format":""},"session_id":{"type":"int","description":"会话id","format":""}}},"VideoDes":{"id":"VideoDes","required":["id","active_num","title","time","time","views"],"properties":{"active_num":{"type":"int","description":"活跃人数","format":""},"id":{"type":"int","description":"唯一id","format":""},"time":{"type":"int","description":"是否已经点赞，0：未点赞，1：已点赞 ，登陆用户需要解析","format":""},"title":{"type":"string","description":"标题","format":""},"views":{"type":"array","description":"视角列表","items":{"$ref":"View"},"format":""}}},"VideoDesInfo":{"id":"VideoDesInfo","required":["code","err","vodeo_info"],"properties":{"code":{"type":"int","description":"0:返回成功...","format":""},"err":{"type":"string","description":"错误信息","format":""},"vodeo_info":{"type":"VideoDes","description":"视频详情","format":""}}},"View":{"id":"View","required":["position","total_time","paly_url"],"properties":{"paly_url":{"type":"string","description":"播放地址","format":""},"position":{"type":"int","description":"位置position","format":""},"total_time":{"type":"int","description":"总时长，单位秒，视频回顾时候需要","format":""}}}}}}`
    BasePath string= "v1"
)

var rootapi swagger.ResourceListing
var apilist map[string]*swagger.ApiDeclaration

func init() {
	if beego.EnableDocs {
		err := json.Unmarshal([]byte(Rootinfo), &rootapi)
		if err != nil {
			beego.Error(err)
		}
		err = json.Unmarshal([]byte(Subapi), &apilist)
		if err != nil {
			beego.Error(err)
		}
		beego.GlobalDocApi["Root"] = rootapi
		for k, v := range apilist {
			for i, a := range v.Apis {
				a.Path = urlReplace(k + a.Path)
				v.Apis[i] = a
			}
			v.BasePath = BasePath
			beego.GlobalDocApi[strings.Trim(k, "/")] = v
		}
	}
}


func urlReplace(src string) string {
	pt := strings.Split(src, "/")
	for i, p := range pt {
		if len(p) > 0 {
			if p[0] == ':' {
				pt[i] = "{" + p[1:] + "}"
			} else if p[0] == '?' && p[1] == ':' {
				pt[i] = "{" + p[2:] + "}"
			}
		}
	}
	return strings.Join(pt, "/")
}
